Skip to content

Replace split_with_sizes_copy with slice_copy #10318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

mcremon-meta
Copy link
Contributor

Summary:
This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace split_with_sizes. That includes:

  • swapping with q/dq nodes to do it in lower bitwidth
  • becoming slice_nop when possible (through memory planning constraints)
  • a few simplification passes on slices
  • possibly finding patterns with slice/cat being a nop
  • we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379

@mcremon-meta mcremon-meta requested a review from tarun292 as a code owner April 20, 2025 22:57
Copy link

pytorch-bot bot commented Apr 20, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10318

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures, 1 Unrelated Failure

As of commit a69ebbc with merge base cc3152b (image):

NEW FAILURES - The following jobs have failed:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 20, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 20, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 20, 2025
Summary:
Pull Request resolved: #10318

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
mcremon-meta added a commit that referenced this pull request Apr 21, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 21, 2025
Summary:
Pull Request resolved: #10318

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Differential Revision: D73312379
facebook-github-bot pushed a commit that referenced this pull request Apr 21, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Reviewed By: zonglinpeng

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 21, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Reviewed By: zonglinpeng

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

mcremon-meta added a commit that referenced this pull request Apr 21, 2025
Summary:
Pull Request resolved: #10318

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Reviewed By: zonglinpeng

Differential Revision: D73312379
mcremon-meta added a commit that referenced this pull request Apr 21, 2025
Summary:

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Reviewed By: zonglinpeng

Differential Revision: D73312379
Summary:
Pull Request resolved: #10318

This is useful for a few reasons, which are all related to the fact that we have a lot of things in place for slice ops, so the compiler can optimize much better if we replace `split_with_sizes`. That includes:
- swapping with q/dq nodes to do it in lower bitwidth
- becoming slice_nop when possible (through memory planning constraints)
- a few simplification passes on slices
- possibly finding patterns with slice/cat being a nop
- we have an optimized slice op on HiFi already. We will get the split op soon to be fair, we can do some profiling then, but the above points will still stand

Reviewed By: zonglinpeng

Differential Revision: D73312379
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D73312379

@facebook-github-bot facebook-github-bot merged commit 647e1f1 into main Apr 22, 2025
82 of 86 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D73312379 branch April 22, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported topic: not user facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants